USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0005_CREATE_TABLE]    Script Date: 11/28/2011 12:01:45 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[WASP_M0005_CREATE_TABLE]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[WASP_M0005_CREATE_TABLE]
GO

USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0005_CREATE_TABLE]    Script Date: 11/28/2011 12:01:45 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		JJ
-- Create date: 28/11/2011
-- Description:	CREATE TABLE 
-- =============================================
CREATE PROCEDURE [dbo].[WASP_M0005_CREATE_TABLE]
AS
BEGIN
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FSEC10]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  drop table [dbo].[FSEC10]
END
BEGIN
	CREATE TABLE Credito_Price(
		CUENTA_DEUDOR Long NOT NULL, 
		Dv_Rut_Deudor VarChar (1) NULL, 
		noperacion Long NOT NULL, 
		Patrimonio Long , 
		Sucursal_Colocacion Short NOT NULL, 
		SALDO_CAPITAL Decimal (28,2) NULL, 
		SALDO_INTERES Decimal (28,2) NULL, 
		SALDO_REAJUSTE Decimal (28,2) NULL, 
		Primer_Vencimiento_Impago DateTime NULL, 
		Ultimo_Vencimiento_Impago DateTime NULL, 
		Rubro_Bantotal VarChar (16) NULL, 
		Rubro_PeopleSoft VarChar (15) NOT NULL, 
		Marca_Fallecido VarChar (1) NOT NULL, 
		Marca_Securitizado VarChar (1) NOT NULL, 
		fecha_colocacion DateTime NULL )
END
GO

